﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;

namespace DevToolsRepo
{
	public class TagInfo
	{
		public string Title { get; set; }

		[XmlIgnore]
		[Browsable(false)]
		public List<ToolInfo> Tools
		{
			get
			{
				return ToolRepository.Instance.Tools.Where(o => o.Tags.Where(oo => oo.Title.Equals(Title, StringComparison.OrdinalIgnoreCase)).Any()).ToList();
			}
		}

		public override string ToString()
		{
			return Title + ", Tools: " + Tools.Count;
		}
	}
}
